import request from "@/utils/request";
import { parseStrEmpty } from "@/utils/ruoyi";
//新增就诊
export function addVisit(data) {
  return request({
    url: "/system/visit",
    method: "post",
    data: data,
  });
}
///PeisBiz/GetProjectMsg  体检系统提供第三方查询检查申请单信息
export function getProjectMsgInfos(query){
  return request({
    url: "/PeisBiz/GetProjectMsg",
    method: "get",
    params: query
  });
}
//system/visit/update/checkinCode  删除无效的登记
export function updateMsgInfos(data){
  return request({
    url: "/system/visit/update/checkinCode",
    method: "put",
    data: data
  });
}
//查询就诊列表
export function getVisit(query) {
  return request({
    url: "/system/visit/list",
    method: "get",
    params: query
  });
}
//查询就诊列表tip
export function listVisitTip(query) {
  return request({
    url: "/system/visit/listTip",
    method: "get",
    params: query
  });
}
//查询就诊列表,筛选照片状态
export function listVisitTipNew(query) {
  return request({
    url: "/system/visit/listTipNew",
    method: "get",
    params: query
  });
}
export function updateVisit(data) {
  return request({
    url: "/system/visit",
    method: "put",
    data: data
  });
}

export function deleteVisit(visitIds, delCause) {
  return request({
    url: "/system/visit/" + visitIds + "/" + delCause,
    method: "get",
  });
}

export function getDetailVisit(visitId) {
  return request({
    url: "/system/visit/" + visitId,
    method: "get",
  });
}
// type 0:身份证  1:姓名  2:卡号
export function getVisitStatus(value,type) {
  return request({
    url: "/system/visit/patient/" + value+'/'+type,
    method: "get",
  });
}
// 给该就诊增加照片编号
export function getPhotoNum(visitId,query) {
  return request({
    url: "/system/visit/photoNum/"+visitId,
    method: "get",
    params: query
  });
}

export function getQuestionnaireCommon(visitId) {
  return request({
    url: "/system/consultation/disease/questionnaireCommon/" + visitId,
    method: "get",
  });
}
export function getAngleCount(patientId) {
  return request({
    url: "/system/patient/countAll/" + patientId,
    method: "get",
  });
}
///system/visit/get/visit/dept 获取患者所在部门
export function getVisitDept(query) {
  return request({
    url: "/system/visit/get/visit/dept",
    method: "get",
    params: query
  });
}
///  system/visit/del/checkinCode 删除体检相关数据
export function delCheckinCode(data) {
  return request({
    url: "/system/visit/del/checkinCode",
    method: "post",
    data: data,
  });
}